home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Apple Shared Library Manager / ASLM Examples / Read Me!
Encoding:
Text File  |  1996-11-19  |  4.9 KB  |  104 lines  |  [TEXT/ttxt]

  1. ASLM Examples folder
  2. ============================
  3.  
  4. This folder contains the source code to many ASLM examples. There are two flavors of examples in this folder. The first includes examples that were done by the ASLM engineering team mainly to test parts of ASLM and to provide some debugging tools. These include the Inspector, TestTools, and ExampleLibrary examples. The other example were done specifically to demonstrate how to do certains things with the ASLM or make use of ASLM features. They are usually easier to read, more to the point, and better documented then the other examples. They include Sample INIT, Sample Apps, FunctionSetInfo, and Example Tools. 
  5.  
  6. The best way to use the examples is to use MPW's search command to look for whatever class, function, or export file info you want to see an example of and then have a look at the source and maybe even change it around so you can get a better understanding of it.
  7.  
  8. Folder organization
  9. ===================
  10.  
  11. All of the examples folders are set up the same way. The sources are in the :sources: folder, the built tools and libraries end up in the :built: folder, and the object files end up in the :objects: folder. The makefile(s) are in the example folder itself. The Example Tools folder has a BuildExample script instead of a makefile. If an example has more than one makefile, execute the makefile that builds the shared libraries first and the tools or applications second.
  12.  
  13. PPC vs. 68K
  14. ==========
  15. Three of the examples have been converted to native PowerPC: Inspector, TestTools, and ExampleLibrary.  PowerPC binaries will always end with "PPC".
  16.  
  17. Since some of the examples are MPW tools and no shipping version of MPW supports native tools, none of the the MPW tools were converted to native PowerPC. The "Tests" menu has been added to InspectorPPC to support the functionality of the TestTool MPW tool. The TestExampleClassPPC application was written to provide some of the functionality of the LibraryMgrTest1 MPW tool.
  18.  
  19. Compiler Support
  20. ================
  21. The Inspector, TestTools, and ExampleLibrary examples all support CFront, SCpp, and MrC. There is a separate makefile for each compiler type and each makefile will place the executables in a separate subfolder of the :Built: folder and will place the objects in a separate folder of the :Objects: folder.
  22.  
  23. Universal Includes
  24. ================
  25. All of the examples use the Universal Includes which means a version of MPW that supports the Universal Includes should be used (ETO #15 or later).
  26.  
  27. Building the examples
  28. ====================
  29.  
  30. Make sure that whenever you build an example you always copy it's shared library (if it has one) into the Extensions folder before you run the example (unless you want to see ASLM exception handling in action!).
  31.  
  32. In order to build the examples you need to do three things: (1) Set {SLMInterfaces} to the directory where the ASLM interface files are located and export it. (2) Set {SLMLibraries} to the folder where the ASLM libraries are located and export it. (3) Either add the directory where the ASLM tools are located to your {Commands} path or copy the tools into the MPW Scripts and Tools folders. If your ASLM Developer Tools folder is inserted at the root of the hard disk "HD", the following will work.
  33.  
  34.         set SCIncludes "{MPW}Interfaces:SCIncludes:"
  35.         export SCIncludes
  36.         set SCLibraries "{MPW}Libraries:SCLibraries:"
  37.         export SCLibraries
  38.         set SLMInterfaces "HD:ASLM Developer Tools:Interfaces:"
  39.         export SLMInterfaces
  40.         set SLMLibraries "HD:ASLM Developer Tools:Libraries:"
  41.         export SLMLibraries
  42.         set Commands "HD:ASLM Developer Tools:Tools:,{Commands}"
  43.  
  44. You must be in the directory containing the makefile in order get the example to build. If you want to build all the example in one shot, then set the current directory to the ASLM Examples folder and then execute the following:
  45.  
  46. directory :ExampleLibrary
  47. make -f makefile.examples.cfront > make.out
  48. make.out
  49. make -f makefile.examples.sc > make.out
  50. make.out
  51. make -f makefile.examples.mrc > make.out
  52. make.out
  53.  
  54. directory ::TestTools
  55. make -f makefile.testlibrary.cfront > make.out
  56. make.out
  57. make -f makefile.testlibrary.sc > make.out
  58. make.out
  59. make -f makefile.testlibrary.mrc > make.out
  60. make.out
  61. make -f makefile.testtools.cfront > make.out
  62. make.out
  63. make -f makefile.testtools.sc > make.out
  64. make.out
  65.  
  66. directory ::Inspector
  67. make -f makefile.inspectorlibs.cfront > make.out
  68. make.out
  69. make -f makefile.inspectorlibs.sc > make.out
  70. make.out
  71. make -f makefile.inspectorlibs.mrc > make.out
  72. make.out
  73. make -f makefile.inspector.cfront > make.out
  74. make.out
  75. make -f makefile.inspector.sc > make.out
  76. make.out
  77. make -f makefile.inspector.mrc > make.out
  78. make.out
  79.  
  80. directory '::Sample INIT:'
  81. make > make.out
  82. make.out
  83.  
  84. directory '::FunctionSetInfo:'
  85. make > make.out
  86. make.out
  87.  
  88. directory '::Example Tools:'
  89. BuildExample -a
  90.  
  91. directory '::Sample Apps:'
  92. directory ':CSample:'
  93. make > make.out
  94. make.out
  95. directory '::PSample:'
  96. make > make.out
  97. make.out
  98. directory '::CCPlusSample:'
  99. make > make.out
  100. make.out
  101. directory '::CPlusSample:'
  102. make > make.out
  103. make.out
  104.